package luj.groovy.excel.internal.table.header

import groovy.transform.PackageScope
import luj.groovy.excel.api.table.header.Header
import luj.groovy.excel.api.table.header.HeaderField
import luj.groovy.excel.internal.table.header.path.HeaderByPathFinder

@PackageScope
class HeaderImpl implements Header {

  @Override
  List<HeaderField> getFields() {
    return _fieldList
  }

  @Override
  HeaderField getField(String path) {
    return new HeaderByPathFinder(_fieldList, path).findByPath()
  }

  List<HeaderField> _fieldList
}
